print("a      a^2      a^3")
print(str(1),"    ",1**2,"      ",str(1**3))
print(str(2),"    ",2**2,"      ",str(2**3))
print(str(3),"    ",3**2,"      ",str(3**3))
print(str(4),"    ",4**2,"     ",str(4**3))
